package com.server.pinggu.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.StringUtils;
import com.server.pinggu.mapper.SenWxuploadsMapper;
import com.server.pinggu.domain.SenWxuploads;
import com.server.pinggu.service.ISenWxuploadsService;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ltao
 * @date 2022-10-23
 */
@Service
public class SenWxuploadsServiceImpl extends ServiceImpl<SenWxuploadsMapper, SenWxuploads> implements ISenWxuploadsService {

    @Override
    public List<SenWxuploads> queryList(SenWxuploads senWxuploads) {
        LambdaQueryWrapper<SenWxuploads> lqw = Wrappers.lambdaQuery();
        if (StringUtils.isNotBlank(senWxuploads.getTitle())){
            lqw.eq(SenWxuploads::getTitle ,senWxuploads.getTitle());
        }
        if (StringUtils.isNotBlank(senWxuploads.getType())){
            lqw.eq(SenWxuploads::getType ,senWxuploads.getType());
        }
        if (StringUtils.isNotBlank(senWxuploads.getPath())){
            lqw.eq(SenWxuploads::getPath ,senWxuploads.getPath());
        }
        if (StringUtils.isNotBlank(senWxuploads.getMediaId())){
            lqw.eq(SenWxuploads::getMediaId ,senWxuploads.getMediaId());
        }
        if (senWxuploads.getDtime() != null){
            lqw.eq(SenWxuploads::getDtime ,senWxuploads.getDtime());
        }
        if (senWxuploads.getSid() != null){
            lqw.eq(SenWxuploads::getSid ,senWxuploads.getSid());
        }
        return this.list(lqw);
    }
}